<template>
  <view class="content" :style="{ 'margin-top': safeArea.top + 'px' }">
    <u-tabs :list="list" @click="changeTabs">
      <view class="main"> lhfasdllaksdhgsdgh </view>
    </u-tabs>
  </view>
</template>

<script>
import { mapState } from "vuex";

export default {
  data() {
    return {
      title: "Hello",
      src: "https://cdn.uviewui.com/uview/album/1.jpg",
      list: [
        {
          name: "待提货",
        },
        {
          name: "在途",
        },
        {
          name: "已完成",
        },
      ],
    };
  },
  computed: {
    ...mapState(["safeArea", "capButton"]),
  },
  onLoad() {
    console.log(this.safeArea, this.capButton);
    if (!this.$store.getters.token) {
      console.log(uni.$u.config.v);
      uni.navigateTo({
        url: "/pages/login/index",
      });
    }
  },
  methods: {
    changeTabs(ev) {
      console.log(ev);
    },
  },
};
</script>

<style lang="scss">
.content {
  .main {
    width: 100vh;
  }
}
</style>
